package com.lichuang.fruitvarietysm.order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 订单明细表
 * </p>
 *
 * @author shuaihang
 * @since 2019-06-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("order_dtl")
@ApiModel(value = "OrderDtl对象", description = "订单明细表")
public class OrderDtl implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单子表id，即商品订单表")
    @TableId(value = "order_dtl_id", type = IdType.AUTO)
    private Integer orderDtlId;

    @ApiModelProperty(value = "用户id")
    private Integer userId;

    @ApiModelProperty(value = "订单号")
    private Long orderNo;

    @ApiModelProperty(value = "商品id")
    private Integer goodsId;

    @ApiModelProperty(value = "商品skuId")
    private Integer skuId;

    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ApiModelProperty(value = "商品主图，url地址")
    private String mainImage;

    @ApiModelProperty(value = "生成订单时商品单价")
    private BigDecimal currentGoodsPrice;

    @ApiModelProperty(value = "商品数量")
    private Integer quantity;

    @ApiModelProperty(value = "商品总价，单位时元，保留两位小数")
    private BigDecimal totalPrice;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private List<List> skuText;


}
